---
title: Notifications router
description: An overview of the Notifications router
---

## Procedures

The notifications router has the following procedures:

### Get the notifications inbox

Returns all the notifications for the current user.

```typescript
// Client components
const { data } = api.notifications.inbox.useQuery()

// Server components
const data = await api.notifications.inbox()
```

### Mark a notification as read

Marks a notification as read.

- Access: `@protected`

```typescript
// Client components
const { data } = api.notifications.markAsRead.useMutation({
  notificationId: 'notification-id',
})

// Server components
const data = await api.notifications.markAsRead({
  notificationId: 'notification-id',
})
```
